Page({
    data: {
        maxlength: 300,
        input: "",
        placeholder: "记录生活,记录美好",
        value: 0
    },
    onLoad: function() {},
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {},
    bindinput: function(n) {
        this.setData({
            value: this.data.maxlength - n.detail.value.length,
            input: n.detail.value
        });
    },
    submit: function(n) {
        this.setData({
            input: "",
            value: this.data.maxlength
        }), wx.showToast({
            title: "提交成功",
            icon: "success",
            duration: 1500,
            mask: !0
        });
    }
});